<template>
<div class="contextMenu">
  <ul @mouseup="handleMouseUp">
    <template v-if="curComponent">
      <template v-if="!curComponent.isLock">
        <li @click="copy">复制</li>
        <li @click="paste">粘贴</li>
        <li @click="cut">剪切</li>
        <li @click="deleteComponent">删除</li>
        <li @click="lock">锁定</li>
        <li @click="topComponent">置顶</li>
        <li @click="bottomComponent">置底</li>
        <li @click="upComponent">上移</li>
        <li @click="downComponent">下移</li>
      </template>
      <li v-else @click="unlock">解锁</li>
    </template>
  </ul>
</div>
</template>

<script lang="ts" setup>

import { useContextMenuStore, useGlobalStore } from "@/store";

const globalStore = useGlobalStore();
const contextMenuStore = useContextMenuStore()
const {curComponent} = globalStore
const {menuTop,menuLeft,menuShow} = contextMenuStore
const handleMouseUp = () =>{}
const copy = () =>{}
const paste = () =>{}
const cut = () =>{}
const deleteComponent = () =>{}
const lock = () =>{}
const topComponent = () =>{}
const bottomComponent = () =>{}
const upComponent = () =>{}
const downComponent = () =>{}

const unlock = () =>{}

</script>

<style scoped>

</style>